package com.estagio.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table (name="itensCompra")
public class ItemCompra extends ItemNota {
	
	@Id
	@SequenceGenerator(name="itensCompra_id", sequenceName="itensCompra_id_seq",allocationSize=1,initialValue = 1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="itensCompra_id" )
	private Integer idItemCompra;
	
	@JoinColumn(name="idCompra")
	@ManyToOne
	private Compra compra;
	private Double precoCusto;
	
	
	public Integer getIdItemCompra() {
		return idItemCompra;
	}
	public void setIdItemCompra(Integer idItemCompra) {
		this.idItemCompra = idItemCompra;
	}
	public Compra getCompra() {
		return compra;
	}
	public void setCompra(Compra compra) {
		this.compra = compra;
	}

	public Double getPrecoCusto() {
		return precoCusto;
	}
	public void setPrecoCusto(Double precoCusto) {
		this.precoCusto = precoCusto;
	}
	
}
